package com.tran.app.screen

import android.content.Context
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.content.ContextCompat
import androidx.navigation.NavController
import com.tran.app.MyApp

import com.tran.app.R
import com.tran.app.data.ActionTitleItem
import com.tran.app.uiweight.ActionTitle

/**
 * author: liuchaoqin
 * 创建时间：2023/12/1
 * Describe ：
 */


@Composable
fun MineScreenTech(modifier: Modifier, navController: NavController) {
    val context = LocalContext.current
        LazyColumn(
            modifier = Modifier
                .fillMaxSize()
        ) {
            item {
                HeaderItem(context)
                CQDivider(thickness = 10.dp, colorId =  R.color.white)
            }
            item {
                ActionTitle(
                    ActionTitleItem(
                        "发布课程",
                        R.drawable.icon_yao,
                    ), context, false,
                    onClick = {
                        navController.navigate("public")
                    })
            }
            item {
                ActionTitle(
                    ActionTitleItem(
                    "修改课程",
                    R.drawable.icon_service,
                ), context, false,
                    onClick = {
                        navController.navigate("show?query=update")
                    })
            }
            item {
                ActionTitle(ActionTitleItem(
                    "申请解除课程",
                    R.drawable.icon_shoucang,
                ), context, true,
                    onClick = {
                        navController.navigate("drop")
                    })
            }
            item {
                ActionTitle(ActionTitleItem(
                    "查看选课信息",
                    R.drawable.icon_set,
                ), context, false,
                    onClick = {
                        navController.navigate("show?query=query")
                    })
            }

        }
}